﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BSCMFF.Core.DataAccessLayer;

namespace BSCMFF.Web.UserControls.Evaluation
{
    /// <summary>
    /// Evaluate personal KPI detail.
    /// </summary>
    /// <remarks></remarks>
    public partial class EvaluatePKPIDetail : System.Web.UI.UserControl
    {
        private Evaluation_PKPIs _epkpi;

        /// <summary>
        /// Gets or sets the EPKPI.
        /// </summary>
        /// <value>The EPKPI.</value>
        /// <remarks></remarks>
        public Evaluation_PKPIs EPKPI
        {
            get
            {
                if (_epkpi == null)
                {
                    _epkpi = new Evaluation_PKPIs();

                    return _epkpi;
                }
                else
                {
                    return _epkpi;
                }

            }
            set
            {
                _epkpi = value;
            }
        }

        /// <summary>
        /// Gets the EPKP i_ ID.
        /// </summary>
        /// <remarks></remarks>
        public int EPKPI_ID
        {
            get
            {
                return Int32.Parse(HiddenEPKPI_ID.Value);
            }
        }

        /// <summary>
        /// Gets the verbal evaluation.
        /// </summary>
        /// <remarks></remarks>
        public String VerbalEvaluation
        {
            get
            {
                return RadTextBoxCurrentVerbalEvaluation.Text;
            }
        }

        /// <summary>
        /// Gets the note.
        /// </summary>
        /// <remarks></remarks>
        public String Note
        {
            get
            {
                return RadTextBoxNote.Text;
            }
        }

        /// <summary>
        /// Gets the score.
        /// </summary>
        /// <remarks></remarks>
        public int Score
        {
            get
            {
                return (int)RadNumericTextBoxScore.Value;
            }
        }

        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        /// <summary>
        /// Disables the text boxes.
        /// </summary>
        /// <remarks></remarks>
        internal void DisableTextBoxes()
        {
            RadTextBoxCurrentVerbalEvaluation.Enabled = false;
            RadNumericTextBoxScore.Enabled = false;
        }
    }
}